package demo.feign;

import feign.RequestInterceptor;
import feign.RequestTemplate;
import javax.annotation.PostConstruct;
import org.springframework.stereotype.Component;

//@Component
public class FeignUrlInterceptor implements RequestInterceptor {


    @Override
    public void apply(RequestTemplate template) {
        //todo 根据规则确定url，然后赋值
//        template.target("http://localhost:8023/order");
        //除此之外，还可以对header进行设置

        template.header("Auth", "test");

    }
}
